/*
 * This file is part of yapk (yet another (auto) process killer) driver.
 *
 * Copyright (C) 2010 by Mateusz Wojcik <mewojcik@gmail.com>
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
#ifndef __CONTRACT_H__
#define __CONTRACT_H__

/*
 * Constants goes here.
 */
#define DEV_TYPE		878787		// Device type.
#define STRING_MAX		255			// Max string size.
#define MAX_LIST_SIZE	30			// Max list size.


/*
 * IOCTLs goes here.
 * Following three ioctls are defined for yapk_drv driver:
 * IOCTL_ADD_PROCESS_TO_BE_KILLED	- adds new entry in process list to be killed 
 *                                    each time process is going to be started.
 * IOCTL_DEL_PROCESS_TO_BE_KILLED	- removes process entry from killer list.
 * IOCTL_SHOW_KILLER_LIST			- returns actual killer list.
 */
#define IOCTL_ADD_PROCESS_TO_BE_KILLED \
   CTL_CODE( DEV_TYPE, 0x800, METHOD_BUFFERED, FILE_ANY_ACCESS )
   
#define IOCTL_DEL_PROCESS_TO_BE_KILLED \
   CTL_CODE( DEV_TYPE, 0x801, METHOD_BUFFERED, FILE_ANY_ACCESS )

#define IOCTL_SHOW_KILLER_LIST \
   CTL_CODE( DEV_TYPE, 0x802, METHOD_BUFFERED, FILE_ANY_ACCESS )	
   

/**
 * @struct YapkProcessInfo
 * This Struct represents process informations.
 */
typedef struct _YapkProcessInfo
{
	CHAR			ProcessName[STRING_MAX];			/**< Process name string.		*/	
} YapkProcessInfo, *PYapkProcessInfo;
#define SIZEOF_YAPK_PROCESS_INFO sizeof(YapkProcessInfo)


/**
 * @struct YapkProcessInfoList
 * This struct represents process informations list.
 */
typedef struct _YapkProcessInfoList
{
	YapkProcessInfo	List[MAX_LIST_SIZE];				/**< Process name list.			*/
	ULONG			NumOfEntries;						/**< Number of entries.			*/
} YapkProcessInfoList, *PYapkProcessInfoList;
#define SIZEOF_YAPK_PROCESS_INFO_LIST sizeof(YapkProcessInfoList)


#endif /*__CONTRACT_H__*/

